import format from '@dfeidao/atom-mobile/dt/format';
import { IFeidaoAiMobile } from '@dfeidao/atom-mobile/interfaces';
import set from '@dfeidao/atom-mobile/local/set';
import render from '@dfeidao/atom-mobile/render/render';
import parse from '@dfeidao/atom-nodejs/dt/parse';
import { Alert } from 'react-native';
import a010 from './a010';

export default async function a008(fd: IFeidaoAiMobile, e: Date) {
	// 确认
	let start_time = parse(e + "");
	const current_time = parse(new Date() + "");
	// console.log(currenttime);
	// console.log(start_time);
	let time1 = format(start_time, 1);
	if (start_time < current_time) {
		Alert.alert("开始时间不能小于当前时间");
		time1 = "";
	} else {
		set(fd, "start_time", start_time);
	}
	const isshow = false;
	const ishow = false;
	render(fd, {
		isDateTimePickerVisible1: isshow,
		isDateTimePickerVisible2: ishow,
		time1
	});
	a010(fd);
}
